<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      template="/web/layout/arearestrita.xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
	
	<ui:define name="bodyPrincipal">
				<p:panel id="panelAreaRestritaLotes" columns="2" style="width:100%">
					<f:facet name="header">
						<h:panelGrid columns="2" style="width:100%">
							<h:panelGrid style="width:100%;text-align:left">
								<h:outputText style="font-size:25px" value="LOTES" />
							</h:panelGrid>
							<h:panelGrid style="width:100%;text-align:right">
								<p:commandLink value="NOVO" 
									action="#{loteBeanSession.novoLote}"  />	
							</h:panelGrid>
						</h:panelGrid>
					</f:facet>
					<p:dataTable id="dtAreaRestritaLotes" paginator="true" rows="20"
					 	emptyMessage="Nenhum lote cadastrado" 
					 		style="text-align:center"
					 		value="#{loteBeanSession.lotesList}" var="lote">
						<p:column style="width:300px" headerText="Nome" filterBy="#{lote.nome}" 
							filterMatchMode="contains">
							<p:commandLink action="#{loteBeanSession.abrirLoteSelecionado}">
								<h:outputText value="#{lote.nome}" />
								<f:setPropertyActionListener 
									target="#{loteBeanSession.loteSelecionado}" 
									value="#{lote}" />
							</p:commandLink>
						</p:column>
						<p:column style="width:150px" headerText="Licitacao (Edital)">
							<h:outputText value="#{lote.licitacao.edital}" />
						</p:column>
						<p:column style="width:100px" headerText="Valor Minimo">
							<h:outputText value="#{lote.valorMinimo}" />
						</p:column>
					</p:dataTable>
				</p:panel>
	</ui:define>

</ui:composition>